package cc.sunni.test.serivce.impl;

import cc.sunni.test.Apple;
import cc.sunni.test.serivce.AppleFormatter;

/**
 * @author jiangli
 * @since 2021/3/18 16:03
 */
public class AppleFancyFormatter implements AppleFormatter {

    @Override
    public String formatter(Apple a) {
        String characteristic = a.getWeight() > 150 ? "heavy" : "light";
        return "A " + characteristic + " " + a.getColor() + " apple";
    }
}
